<?php
use yii\bootstrap\ActiveForm;
use \app\service\StaticService;

StaticService::includeAppJsStatic("/admin/paper/chuti.js?v=2020324",\app\assets\AppAsset::className());
?>
<!--
    出题页面
-->
<style type="text/css">
	h2{text-align:center;background: #389fc3;border-radius:5px;}
	.overflow{overflow:hidden;background: #f7f7f7;}
	.col-md-1{width:10%;overflow:hidden;}
	.green{color:red;}
	#controller td:hover{cursor:pointer;border:2px solid red;}
	.lp{    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content:end;}
</style>

<?php $form = ActiveForm::begin(['action' => ['addpaper'],'method'=>'post','id'=>'thisform']); ?>
	
	
	<div id="radioarea" class="overflow">
		<hr >
		<h2 class="h2">单选题区域</h2>
	</div>

	<hr >
	
	
	<div id="checkboxarea" class="overflow">
		<hr >
		<h2>多选题区域</h2>
	</div>
	<hr >
	
	<div id="judgearea" class="overflow">
		<hr >
		<h2>判断题区域</h2>
	</div>
	<hr >
	
	<div id="completionarea" class="overflow">
		<hr >
		<h2>填空题区域</h2>
	</div>
	<hr >
	
	<div id="bossarea" class="overflow" style="margin-bottom: 150px">
		<hr >
		<h2>大题区域</h2>
	</div>
	<hr >
	<input type="hidden" name="tid" value="<?= $tid ?>">
	<!--  统计区域 -->
<div class="container" style="position:fixed;bottom:0;background:#999A9C;z-index:999;border-radius:5px;padding-left:-;margin-left:0;" id="calcAll">
  <div class="row lp">
  	<div class="col-md-1">
  		已添加 <span id="selnum" class="green">0</span>道单选题
  		,每题<input type="number" value="1" name='survey[selscore]' sign='a'>分
  	</div>
  	<div class="col-md-1">
  		已添加 <span id="chenum" class="green">0</span>道多选题
  		,每题<input type="number" value="2" name="survey[chescore]" sign='b'>分
  	</div>
  	<div class="col-md-1">
  		已添加 <span id='judnum' class="green">0</span>道判断题
  		,每题<input type="number" value="2" name='survey[judscore]' sign='c'>分
  	</div>
  	<div class="col-md-1">
  		已添加 <span id="cmpnum" class="green">0</span>道填空题,
  		每题<input type="number" value="3" name='survey[cmpscore]' sign='d'>分
  	</div>
  	<div class="col-md-1">
  		已添加 <span id="bosnum" class="green">0</span>道大题
  		,每题<input type="number" value="10" name='survey[bosscore]' sign='e'>分
  	</div>
  	<div class="col-md-1">
  		考试时间设置为（分钟）
  		<div><input type="number" value="120" name="survey[timeout]"></div>
  	</div>
  	<div class="col-md-1">
        <input type="hidden" name="fullmarks" value="0" id="fuma"/>
        满分：<span id="scoretotal" style="color:green;">0</span><br>
  		及格分为:(分)
  		<div><input type="number" value="60" name="survey[overscore]"></div>
  	</div>
  	<div class="col-md-1">
  		试卷名：
  		"xx年级第x次考试"
  		<div><textarea rows="4" class="form-control" style="overflow:auto;resize:none;" name="survey[examname]"></textarea></div>
  	</div>
  	<div class="col-md-1">
  		<input type="submit" class="btn btn-info" value="提交试卷" id="submitbtn">
  	</div>
  </div>
</div>
<?php ActiveForm::end(); ?>





<!--  模板区域 -->

	<table style="position:fixed;right:1%;top:20%;z-index:999;" id="controller"> 
		<tr >
			<th colspan='4'><center>选题添加的题型</center></th>
		</tr>
		<tr>
			<td class="form-control"> <span class="glyphicon glyphicon-record" aria-hidden="true"></span>
            <span class="glyphicon-class">单选题</span>
            </td>
          <td class="form-control"><span class="glyphicon glyphicon-th-large" aria-hidden="true"></span>
          <span class="glyphicon-class">多选</span>
          </td>
          <td class="form-control">
          	<span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span>
          <span class="glyphicon-class">判断题</span>
          </td>
          <td class="form-control"> <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
          <span class="glyphicon-class">填空</span>
          </td>
          <td class="form-control">
          	<span class="glyphicon glyphicon-star-empty" aria-hidden="true"></span>
          <span class="glyphicon-class">大题</span>
     	 </td>

		</tr>

	</table>














































<!-- ------------------------------------ -->
<div style="display:none">
<!-- 简答题  -->
<div id="shotanswer">

	<div >
		<div class="form-group">
		<label for="name">简答题：</label>
		<div class="active" style="color:red;">题纲</div>
		<textarea class="form-control" rows="5" name="shotanswer[]">请在不用系统函数的情况下实现冒泡排序
		</textarea>
	</div>
	</div>
</div>

	<!-- 填空题  -->
<div id="completionmodel">
	<hr />
	<div class="form-group">
		<label for="name">填空题</label>
		<div class="active" style="color:#00AF00;">用 2 个下滑线取代空区域 __,试卷中会将此区域替换为可输入域</div>
		<input type="text" class="form-control" id="name" 
			   placeholder="例如 ： 鱼我所欲也,__。二者不可得兼,__。" name="completions[]">
	</div>
</div>

<!-- 判断题  -->
<div id="judgemodel">
	<div class="form-group">
		<label for="name">判断题题目</label>
		<input type="text" class="form-control" id="name" 
			   placeholder="例如 ： 简述问题关键" name="judge_title">
	</div>
	<label for="basic-url">答案设置：</label>
		<div class="input-group">
			<label>
				<span class="glyphicon glyphicon-ok" aria-hidden="true"></span><input type="radio" class="form-control" name="judge_ans" value="1">
			</label>
		<span style="padding:0 2rem;"></span>
		
			<label>
				<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
				<input type="radio" class="form-control" name="judge_ans" value="0">
			</label>
	</div>
</div>	<hr >
<!--  多选题  -->
<div id="checkboxmodel">
	<div class="form-group">
		<label for="name">多选题题目</label>
		<input type="text" class="form-control" id="name" 
			   placeholder="例如 ： 下列属于php数据类型的有" name="box_title">
	</div>
	<div class="form-group">
		<label for="firstname" class="col-sm-2 control-label">选项A</label>
		<div class="col-sm-10">
			<input type="text" class="form-control" id="firstname" 
				   placeholder="数组" name="box_q">
		</div>
	</div>
	<div class="form-group">
		<label for="firstname" class="col-sm-2 control-label">选项B</label>
		<div class="col-sm-10">
			<input type="text" class="form-control" id="firstname" 
				   placeholder="对象" name="box_q">
		</div>
	</div>
	<div class="form-group">
		<label for="firstname" class="col-sm-2 control-label">选项C</label>
		<div class="col-sm-10">
			<input type="text" class="form-control" id="firstname" 
				   placeholder="布尔" name="box_q">
		</div>
	</div>
	<div class="form-group">
		<label for="firstname" class="col-sm-2 control-label">选项D</label>
		<div class="col-sm-10">
			<input type="text" class="form-control" id="firstname" 
				   placeholder="整型" name="box_q">
		</div>
	</div>
	<label for="basic-url">正确答案：</label>
	<div class="input-group">
	  <span class="input-group-addon" id="basic-addon3">请输入正确答案，多个答案间用 <font color="red">&</font> 号隔开</span>
	  <input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3" placeholder="例如 ： A&B&B&D" name="box_ans">
	</div>
</div>


	<!--  单选题  -->	
	<div id="radiomodel">
		<div class="form-group">
			<label for="name">单选题题目</label>
			<input type="text" class="form-control" id="name" 
				   placeholder="题目" name="radio_title">
		</div>
		<div class="form-group">
			<label for="firstname" class="col-sm-2 control-label">选项A</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="firstname" 
					   placeholder="选项内容" name="radio_q">
			</div>
		</div>
		<div class="form-group">
			<label for="firstname" class="col-sm-2 control-label">选项B</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="firstname" 
					   placeholder="选项内容" name="radio_q">
			</div>
		</div>
		<div class="form-group">
			<label for="firstname" class="col-sm-2 control-label">选项C</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="firstname" 
					   placeholder="选项内容" name="radio_q">
			</div>
		</div>
		<div class="form-group">
			<label for="firstname" class="col-sm-2 control-label">选项D</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="firstname" 
					   placeholder="选项内容" name="radio_q">
			</div>
		</div>
		<div class="form-group">
			<label for="firstname" class="col-sm-2 control-label">正确选项设置</label>
			<div class="col-sm-10">
				<label class="col-sm-1">A<input type="radio" name="radio_ans" value="A"></label>
				<label class="col-sm-1">B<input type="radio" name="radio_ans" value="B"></label>
				<label class="col-sm-1">C<input type="radio" name="radio_ans" value="C"></label>
				<label class="col-sm-1">D<input type="radio" name="radio_ans" value="D"></label>
			</div>
		</div>
	</div>
</div><!-- display:none  -->